CDR_DATA_FILEROOT  = "/usr/voip_metrics/rawcdrs"
CDR_NEWEXT         = ".imported"


###########################################################################
##
## => Labels in the hash
##
###########################################################################
RECORD_ID                                 = "record_id"

C1_START_TIME                             = "c1_start_time"
C2_START_TIME                             = "c2_start_time"
C3_CALL_DURATION                          = "c3_call_duration"
C4_CALL_SOURCE                            = "c4_call_source"
C5_CALL_SOURCE_Q931SIG_PORT               = "c5_call_source_q931sig_port"
C6_CALL_DEST                              = "c6_call_dest"
C7_FIELD_UNUSED                           = "c7_field_unused"
C8_CALL_SOURCE_CUSTID                     = "c8_call_source_custid"
C9_CALLED_PARTY_ON_DEST__CALL_TO_         = "c9_called_party_on_dest__CALL_TO_"
C10_CALLED_PARTY_FROM_SRC                 = "c10_called_party_from_src"
C11_CALL_TYPE                             = "c11_call_type"
C12_FIELD_UNUSED                          = "c12_field_unused"
C13_DISCONNECT_ERROR_TYPE                 = "c13_disconnect_error_type"
C14_CALL_ERROR                            = "c14_call_error"
C15_CALL_ERROR                            = "c15_call_error"
C16_FIELD_UNUSED                          = "c16_field_unused"
C17_FIELD_UNUSED                          = "c17_field_unused"
C18_ANI__CALLING_FROM_                    = "c18_ani__CALLING_FROM_"
C19_FIELD_UNUSED                          = "c19_field_unused"
C20_FIELD_UNUSED                          = "c20_field_unused"
C21_FIELD_UNUSED                          = "c21_field_unused"
C22_CDR_SEQ_NO                            = "c22_cdr_seq_no"
C23_FIELD_UNUSED                          = "c23_field_unused"
C24_CALLID                                = "c24_callid"
C25_CALL_HOLD_TIME                        = "c25_call_hold_time"
C26_CALL_SOURCE_REGID                     = "c26_call_source_regid"
C27_CALL_SOURCE_UPORT                     = "c27_call_source_uport"
C28_CALL_DEST_REGID                       = "c28_call_dest_regid"
C29_CALL_DEST_UPORT                       = "c29_call_dest_uport"
C30_ISDN_CAUSE_CODE                       = "c30_isdn_cause_code"
C31_CALLED_PARTY_AFTER_SRC_CALLING_PLAN   = "c31_called_party_after_src_calling_plan"
C32_CALL_ERROR_DEST                       = "c32_call_error_dest"
C33_CALL_ERROR_DEST                       = "c33_call_error_dest"
C34_CALL_ERROR_EVENT_STR                  = "c34_call_error_event_str"
C35_NEW_ANI                               = "c35_new_ani"
C36_CALL_DURATION                         = "c36_call_duration"
C37_INCOMING_LEG_CALLID                   = "c37_incoming_leg_callid"
C38_PROTOCOL                              = "c38_protocol"
C39_CDR_TYPE                              = "c39_cdr_type"
C40_HUNTING_ATTEMPTS                      = "c40_hunting_attempts"
C41_CALLER_TRUNK_GROUP                    = "c41_caller_trunk_group"
C42_CALL_PDD                              = "c42_call_pdd"
C43_H323_DEST_RAS_ERROR                   = "c43_h323_dest_ras_error"
C44_H323_DEST_H225_ERROR                  = "c44_h323_dest_h225_error"
C45_SIP_DEST_RESPCODE                     = "c45_sip_dest_respcode"
C46_DEST_TRUNK_GROUP                      = "c46_dest_trunk_group"
C47_CALL_DURATION_FRACTIONAL              = "c47_call_duration_fractional"
C48_TIMEZONE                              = "c48_timezone"
C49_MSW_NAME                              = "c49_msw_name"
C50_CALLED_PARTY_AFTER_TRANSIT_ROUTE      = "c50_called_party_after_transit_route"
C51_CALLED_PARTY_ON_DEST_NUM_TYPE         = "c51_called_party_on_dest_num_type"
C52_CALLED_PARTY_FROM_SRC_NUM_TYPE        = "c52_called_party_from_src_num_type"
C53_CALL_SOURCE_REALM_NAME                = "c53_call_source_realm_name"
C54_CALL_DEST_REALM_NAME                  = "c54_call_dest_realm_name"
C55_CALL_DEST_CRNAME                      = "c55_call_dest_crname"
C56_CALL_DEST_CUSTID                      = "c56_call_dest_custid"
C57_CALL_ZONE_DATA                        = "c57_call_zone_data"
C58_CALLING_PARTY_ON_DEST_NUM_TYPE        = "c58_calling_party_on_dest_num_type"
C59_CALLING_PARTY_FROM_SRC_NUM_TYPE       = "c59_calling_party_from_src_num_type"
C60_ORIGINAL_ISDN_CAUSE_CODE              = "c60_original_isdn_cause_code"
C61_PACKETS_RECEIVED_ON_SRC_LEG           = "c61_packets_received_on_src_leg"
C62_PACKETS_LOST_ON_SRC_LEG               = "c62_packets_lost_on_src_leg"
C63_PACKETS_DISCARDED_ON_SRC_LEG          = "c63_packets_discarded_on_src_leg"
C64_PDV_ON_SRC_LEG                        = "c64_pdv_on_src_leg"
C65_CODEC_ON_SRC_LEG                      = "c65_codec_on_src_leg"
C66_LATENCY_ON_SRC_LEG                    = "c66_latency_on_src_leg"
C67_RFACTOR_ON_SRC_LEG                    = "c67_rfactor_on_src_leg"
C68_PACKETS_RECEIVED_ON_DEST_LEG          = "c68_packets_received_on_dest_leg"
C69_PACKETS_LOST_ON_DEST_LEG              = "c69_packets_lost_on_dest_leg"
C70_PACKETS_DISCARDED_ON_DEST_LEG         = "c70_packets_discarded_on_dest_leg"
C71_PDV_ON_DEST_LEG                       = "c71_pdv_on_dest_leg"
C72_CODEC_ON_DEST_LEG                     = "c72_codec_on_dest_leg"
C73_LATENCY_ON_DEST_LEG                   = "c73_latency_on_dest_leg"
C74_RFACTOR_ON_DEST_LEG                   = "c74_rfactor_on_dest_leg"
C75_SIP_SRC_RESPCODE                      = "c75_sip_src_respcode"
C76_PEER_PROTOCOL                         = "c76_peer_protocol"
C77_SRC_PRIVATE_IP                        = "c77_src_private_ip"
C78_DEST_PRIVATE_IP                       = "c78_dest_private_ip"
C79_SRC_IGRP_NAME                         = "c79_src_igrp_name"
C80_DEST_IGRP_NAME                        = "c80_dest_igrp_name"
C81_                                      = "c81_"
C82_                                      = "c82_"
C83_                                      = "c83_"
C84_                                      = "c84_"
C85_                                      = "c85_"
C86_WHO_DISCONNECTED                      = "c86_WHO_DISCONNECTED"
C87_                                      = "c87_"
C88_                                      = "c88_"
C89_                                      = "c89_"
C90_                                      = "c90_"
C91_                                      = "c91_"
C92_                                      = "c92_"
C93_                                      = "c93_"
C94_                                      = "c94_"
C95_                                      = "c95_"
C96_                                      = "c96_"
C97_                                      = "c97_"
C98_                                      = "c98_"
C99_                                      = "c99_"

#################################################################################################
##
##  all the keys in the hash
##
#################################################################################################
KEYS = [
C1_START_TIME,                           C2_START_TIME,                           C3_CALL_DURATION,                        
C4_CALL_SOURCE,                          C5_CALL_SOURCE_Q931SIG_PORT,             C6_CALL_DEST,                            
C7_FIELD_UNUSED,                         C8_CALL_SOURCE_CUSTID,                   C9_CALLED_PARTY_ON_DEST__CALL_TO_,       
C10_CALLED_PARTY_FROM_SRC,               C11_CALL_TYPE,                           C12_FIELD_UNUSED,                        
C13_DISCONNECT_ERROR_TYPE,               C14_CALL_ERROR,                          C15_CALL_ERROR,                          
C16_FIELD_UNUSED,                        C17_FIELD_UNUSED,                        C18_ANI__CALLING_FROM_,                  
C19_FIELD_UNUSED,                        C20_FIELD_UNUSED,                        C21_FIELD_UNUSED,                        
C22_CDR_SEQ_NO,                          C23_FIELD_UNUSED,                        C24_CALLID,                              
C25_CALL_HOLD_TIME,                      C26_CALL_SOURCE_REGID,                   C27_CALL_SOURCE_UPORT,                   
C28_CALL_DEST_REGID,                     C29_CALL_DEST_UPORT,                     C30_ISDN_CAUSE_CODE,                     
C31_CALLED_PARTY_AFTER_SRC_CALLING_PLAN, C32_CALL_ERROR_DEST,                     C33_CALL_ERROR_DEST,                     
C34_CALL_ERROR_EVENT_STR,                C35_NEW_ANI,                             C36_CALL_DURATION,                       
C37_INCOMING_LEG_CALLID,                 C38_PROTOCOL,                            C39_CDR_TYPE,                            
C40_HUNTING_ATTEMPTS,                    C41_CALLER_TRUNK_GROUP,                  C42_CALL_PDD,                            
C43_H323_DEST_RAS_ERROR,                 C44_H323_DEST_H225_ERROR,                C45_SIP_DEST_RESPCODE,                   
C46_DEST_TRUNK_GROUP,                    C47_CALL_DURATION_FRACTIONAL,            C48_TIMEZONE,                            
C49_MSW_NAME,                            C50_CALLED_PARTY_AFTER_TRANSIT_ROUTE,    C51_CALLED_PARTY_ON_DEST_NUM_TYPE,       
C52_CALLED_PARTY_FROM_SRC_NUM_TYPE,      C53_CALL_SOURCE_REALM_NAME,              C54_CALL_DEST_REALM_NAME,                
C55_CALL_DEST_CRNAME,                    C56_CALL_DEST_CUSTID,                    C57_CALL_ZONE_DATA,                      
C58_CALLING_PARTY_ON_DEST_NUM_TYPE,      C59_CALLING_PARTY_FROM_SRC_NUM_TYPE,     C60_ORIGINAL_ISDN_CAUSE_CODE,            
C61_PACKETS_RECEIVED_ON_SRC_LEG,         C62_PACKETS_LOST_ON_SRC_LEG,             C63_PACKETS_DISCARDED_ON_SRC_LEG,        
C64_PDV_ON_SRC_LEG,                      C65_CODEC_ON_SRC_LEG,                    C66_LATENCY_ON_SRC_LEG,                  
C67_RFACTOR_ON_SRC_LEG,                  C68_PACKETS_RECEIVED_ON_DEST_LEG,        C69_PACKETS_LOST_ON_DEST_LEG,            
C70_PACKETS_DISCARDED_ON_DEST_LEG,       C71_PDV_ON_DEST_LEG,                     C72_CODEC_ON_DEST_LEG,                   
C73_LATENCY_ON_DEST_LEG,                 C74_RFACTOR_ON_DEST_LEG,                 C75_SIP_SRC_RESPCODE,                    
C76_PEER_PROTOCOL,                       C77_SRC_PRIVATE_IP,                      C78_DEST_PRIVATE_IP,                     
C79_SRC_IGRP_NAME,                       C80_DEST_IGRP_NAME,                      C81_,                                    
C82_,                                    C83_,                                    C84_,                                    
C85_,                                    C86_WHO_DISCONNECTED,                    C87_,                                    
C88_,                                    C89_,                                    C90_,                                    
C91_,                                    C92_,                                    C93_,                                    
C94_,                                    C95_,                                    C96_,                                    
C97_,                                    C98_,                                    C99_,                                    
]